<?php


namespace app\admin\controller;


use cmf\controller\AdminBaseController;

class ExpressController extends AdminBaseController
{
    public function index()
    {
//        $list = ['HHTT', 'JTSD', 'ZTO', 'YD', 'HTKY', 'YTO'];
        $list = cmf_get_option('express_settings');
        $this->assign('list', $list);
        return $this->fetch();
    }

    public function postData()
    {
        $data = $this->request->param('data');
        $datas = $this->request->param('datas');
        if (!empty($datas['Code'])){
            $data[$datas['Code']] = $datas;
        }

        cmf_set_option('express_settings', $data, true);
        $this->success('ok');
    }
}